home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CSpinCursor / CSpinCursor.h < prev   
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.4 KB  |  42 lines  |  [TEXT/KAHL]

  1. /******************************************************************************
  2.     CSpinCursor.h
  3.     
  4.     Implements a spinning colorcursor. A list of 'crsr' cursors is specified 
  5.     with an'acur' resource. Repeatedly invoking the Spin() method sequences
  6.     through the list of cursors.
  7.     
  8.     SUPERCLASS = CObject.c
  9.     
  10.     Copyright © 1993 Martin R. Wachter. All rights reserved.
  11.  
  12. ******************************************************************************/
  13.  
  14. #define kacurID                1024
  15. #define kthresholdTime        1
  16. #define    kintervalTime        2
  17.  
  18. #define    _H_CSpinCursor
  19.  
  20. #include "CObject.h"                    /* Interface for its superclass        */
  21.  
  22. typedef    struct    acurRec    {                /* Modified 'acur' resource format    */
  23.     short        numCursors;                /*   Number of cursors in list        */
  24.     short        counter;                /*   Counter (not used by us)        */
  25.     CCrsrHandle    cursors[4];                /*   List of Cursor handles            */
  26. } acurRec, **acurHand;
  27.  
  28.  
  29. struct CSpinCursor : public CObject {    /* Class Declaration                */
  30.  
  31.     acurHand    acurH;                    /* Handle to 'acur' resource        */
  32.     short        threshold;                /* Tick delay before first spin        */
  33.     short        interval;                /* Tick delay between spins            */
  34.     short        cursIndex;                /* Index into CURSlist                */
  35.     long        nextSpinTime;            /* Tick count for the next spin        */
  36.  
  37.     void        ISpinCursor(short acurID, short aThreshold, short anInterval);
  38.     void        Dispose(void);
  39.     void        Reset(void);
  40.     void        SetTimes(short newThreshold, short newInterval);
  41.     void        Spin(void);
  42. };